package com.coderyeah.cosmetology.controller;


import com.coderyeah.cosmetology.service.OrderService;
import com.coderyeah.cosmetology.util.Result;
import com.coderyeah.cosmetology.vo.OrderParams;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lqs
 * @since 2022-05-24
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderService orderService;

    @PostMapping("createOrder")
    public Result createOrder(@RequestBody OrderParams orderParams) {
        return orderService.createOrder(orderParams);
    }

    @GetMapping("queryOrderData")
    public Result queryOrderData(String token, String orderstate) {
        return orderService.queryOrderData(token, orderstate);
    }
}

